package com.codefish.codefish_blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 评论记录类
 *
 * @author codefish
 * @since 2022-03-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CommentRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评论id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 父评论id(二级评论)
     */
    private Long pid;

    /**
     * 评论者id
     */
    private Integer ownerId;

    /**
     * 评论者用户名
     */
    @TableField(exist = false)
    private String ownerName;

    /**
     * 评论所属文章id
     */
    private Long articleId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论时间
     */
    private Date commentDate;

    /**
     * 评论点赞数
     */
    private Integer likes;


}
